<!doctype html>
<html>
      <head>
            <title>feb</title>
            <meta charset="UTF-8"/>
            <link rel="stylesheet" type="text/css" href="css/easyui.css">
            <link rel="stylesheet" type="text/css" href="css/icon.css">
            <link rel="stylesheet" type="text/css" href="css/color.css">
            <link rel="stylesheet" type="text/css" href="css/public.css">
            <link rel="shortcut icon" href="/webapp/favicon.ico"/>
            <script type="text/javascript" src="js/lib/jquery.min.js"></script>
            <script type="text/javascript" src="js/lib/jquery.easyui.min.js"></script>
            <script type="text/javascript" src="js/lib/jquery.global.settings.js"></script>
            <script type="text/javascript" src="js/common/config.js"></script>
      </head>
    <style type="text/css" >

        input {
            width: 270px;
            height: 42px;
            line-height: 42px;
            margin-top: 25px;
            padding: 0 15px;
            background: #2d2d2d;
            background: rgba(254, 255, 235, 0.15); /*输入框背景色*/
            -moz-border-radius: 6px;
            -webkit-border-radius: 6px;
            border-radius: 6px;
            border: 1px solid #fffefa;
            border: 1px solid rgba(255, 255, 255, .15);
            -moz-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .1) inset;
            -webkit-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .1) inset;
            box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .1) inset;
            font-family: "Microsoft YaHei", Helvetica, Arial, sans-serif;
            font-size: 14px;
            color: #fff;
            text-shadow: 0 1px 2px rgba(0, 0, 0, .1);
            -o-transition: all .2s;
            -moz-transition: all .2s;
            -webkit-transition: all .2s;
            -ms-transition: all .2s;
        }
        #username{
            background-image: url(css/images/user.png);
            background-repeat: no-repeat;/*背景小图标不重复*/
            background-size: 30px;/*小图标的大小*/
            background-position: 260px center;/*小图标在input的位置*/
        }
        #password{
            background-image: url(css/images/pwd.png);
            background-repeat: no-repeat;/*背景小图标不重复*/
            background-size: 30px;/*小图标的大小*/
            background-position: 260px center;/*小图标在input的位置*/
        }
        /*body{*/
            /*background: -moz-linear-gradient(top, #4B8C5C 0%, #75945E 100%) ;*/
            /*background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00a09d), color-stop(100%,#008985))  ;*/
            /*background: -webkit-linear-gradient(top, #00a09d 0%,#008985 100%) ;*/
            /*background: -o-linear-gradient(top, #00a09d 0%,#008985 100%) ;*/
            /*background: -ms-linear-gradient(top, #00a09d 0%,#008985 100%) ;*/
        /*}*/
        #grad1 {
            background-repeat: no-repeat;
            /*background-size:100%;-moz-background-size:100% 100%;*/
            width: 100vw;
            height: 100vh;
            gradientType:0;
            background: linear-gradient(#484848, #b6b6b6);
            /* 标准的语法（必须放在最后） */
        }
    </style>
      <!--<body class="easyui-layout">-->

      <!--background-image: url(css/images/dn.png);-->
      <!--<body style="background-repeat: no-repeat;background-size:100%;-moz-background-size:100% 100%;" calss="gradient">-->
      <body style="" >
        	<!--<div data-options="region:'north',border:false">-->
               <!--<div class="web-header">-->
                  <!--<a class="logo" href="">北京泛博瑞数据管理系统</a>-->
               <!--</div>-->
        	<!--</div>-->
<div style="position:absolute; left: 0px;right: 0px;top: 0px;bottom: 0px"  id="grad1">

    <center>
        <div style="padding:3% 10%;margin-top: 6%;"><!--margin-bottom: 31%-->
            <img style="width: 70%;height: 30%;float:left;" src="css/images/dn1.png"/>
            <div style="float:right;margin-right: 10%;margin-top:7%;margin-left: -50%;">
                    <img  style="width:100%;"src="css/images/logoym.png"/>

               <div data-options="region:'center',border:false" style="margin-top: 10%"  id="login-content" >
                    <div  title="用户登录" style="width:420px; " >
                        <form id="ff" method="post" style="width:500px;background: rgba(101, 101, 101, 0.15)">

                            <div style="margin-bottom:2%;margin-top: 8%">
                                <span style="text-decoration:none;color: #ffffff;font-size: 23px;margin-right: 4%">账号</span>
                                <input type="text" placeholder="请输入用户名" value="" id="username" name="username" autocomplete="on" required>
                            </div>
                            <div style="margin-bottom:4%">
                                <span style="text-decoration:none;color: #ffffff;font-size: 23px;margin-right: 4%">密码</span>
                                <input type="password" placeholder="请输入密码" value="" id="password" name="password"  required >
                            </div>
                            <div >
                                <a href="" style="text-decoration:none;color: #ffffff;font-size: 16px; margin-left: 15%">忘记密码</a>
                                <a style="    margin-left: 34%;text-decoration:none;color: #ffffff;font-size: 16px;" href="">注册账户</a>
                            </div>

                            <div style="text-align:center;padding:10% 0;margin-left: 3%">
                                <a href="javascript:void(0)" class="easyui-linkbutton" style="font-size: 16px; color:#e8e6ee;background:#c30d23;   padding:1% 27%;margin-left: 12%;" onclick="submitForm()" >登录</a>
                                <!--<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()" style="padding:0% 8%;margin-left: 3%">重置</a>-->
                            </div>
                        </form>

                    </div>
                </div>
            </div>



        </div>
    </center>
    <div data-options="region:'south',border:false" >
        <div class="web-footer" style="position:fixed;bottom:0;width: 100%;"><!--color: white-->
            <h6>Copyright © 2006-2021 FEB Consulting Group All Rights Reserved</h6>
        </div>
    </div>
</div>
      </body>
      <script type="text/javascript">
          $(function(e){
              $("#ff").keydown(function (e) {
                  var e = event || window.event;
                  var keyCode = e.keyCode || e.which;
                  if(keyCode=="13"){
                      submitForm();
                  }
              });
          });
          function submitForm(){
              var valid = $("#ff").form("enableValidation").form("validate");
              if(valid){
                  var data = getFormData(document.getElementById("ff"));
                  $.ajax({
                      url:config.url+"/user/login",
                      type:'post',
                      data:transfer(data),
                      xhrFields:{withCredentials:true},
                      success:function(data){
                          if(data.code==200){
                              sessionStorage.setItem('Authorization', data.data);
                              location.href = "pages/main/main.html";
                          }else{
                              $.messager.alert("提示","登录失败","error");
                          }
                      },
                      error:function(data){
                          console.log(data);
                      }
                  });
              }
          }
          function clearForm() {
              $("#ff").form("reset");
          }

      </script>
</html>